package com.fingard.avatar.website.model.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 
 *
 * @author 徐一涛
 * @date 2022-04-26
 */
@Data
@Accessors(chain = true)
@TableName("sys_user_token")
public class SysUserTokenPo {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户token
     */
    @TableField("token")
    private String token;

    @TableField(value = "user_id")
    private Long userId;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
